package org.karelun.ideaboard.edit.ui.cdo.action;

import org.eclipse.emf.cdo.view.CDOView;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.karelun.ideaboard.edit.ui.cdo.ITransactionEditingDomain;

public class CutAction extends org.eclipse.emf.edit.ui.action.CutAction {

	public CutAction(ITransactionEditingDomain domain) {
		super(domain);
	}

	public CutAction() {
		super();
	}

	@Override
	public boolean updateSelection(IStructuredSelection selection) {
		CDOView cdoView = ((ITransactionEditingDomain) getEditingDomain())
				.getCDOView();
		if (cdoView.isClosed() || cdoView.isReadOnly()) {
			return false;
		}
		return super.updateSelection(selection);
	}
}
